package com.open.basic.event;

import com.open.basic.spring.SpringContextUtil;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;


/**
 * @author: system
 * @Date: 2024/10/19 上午11:59
 * @Version: V1.0
 * @description: |
 */


public class EventPublisherFactory {

    private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(EventPublisherFactory.class);

    public static void publishEvent(ApplicationEvent event) {
        SpringContextUtil.getApplicationContext().publishEvent(event);
    }

    public static void publishEvent(Object event) {
        SpringContextUtil.getApplicationContext().publishEvent(event);
    }
}
